<?php get_header(); ?>

<div class="top">
  <div class="main">
    <div class="topbox topboxlist">
      <p>
<?php  
    $category = get_the_category(); // 获取当前文章的分类数组  
    $category_name = $category[0]->name; // 获取第一个分类的名称  
    echo $category_name; // 输出分类名称  
?>
		</p>
      <img src="<?php  
    $category = get_the_category(); // 获取当前文章的分类数组  
    $category_description = $category[0]->description; // 获取第一个分类的描述  
    echo $category_description; // 输出分类描述  
?>" class="topboxlistimg">
    </div>
  </div>
</div>



<div class="plistbox">
  <div class="main">
    <div class="plistboxs">


      <?php $post_query = new WP_Query('showposts=100');
      while (have_posts()) : the_post(); ?>


        <a href="<?php the_permalink(); ?>">
          <?php if (has_post_thumbnail()) : ?>

            <?php echo get_the_post_thumbnail($post->ID, 'product_img', array('alt' => $post->post_title)) ?>

          <?php else : ?>
				<img src="<?php bloginfo('template_directory'); ?>/img/cpmr.png">
          <?php endif; ?>
          <span><?php the_title(); ?></span>

			<em><?php echo get_post_meta($post->ID, "产品描述", true); ?></em>

          


        <p><b><?php echo get_post_meta($post->ID, "价格", true); ?></b>Learn more<i></i></p>
        </a>

      <?php endwhile; ?>



    </div>
  </div>
</div>

<script>
  $(function() {
    $("body").addClass("bj2")
  })
</script>


<?php get_footer(); ?>